// store/modules/publicInfo.js
const state = {
  isCollapse: false // 左侧菜单栏是否展开
}

const mutations = {
  SET_IS_COLLAPSE(state, bool) {
    state.isCollapse = bool
  }
}

const actions = {
  // 如果需要异步操作可以在这里添加
  setIsCollapse({ commit }, bool) {
    commit('SET_IS_COLLAPSE', bool)
  }
}

const getters = {
  isCollapse: state => state.isCollapse
}

export default {
  namespaced: true, // 启用命名空间
  state,
  mutations,
  actions,
  getters
}
